package com.vcs.dao;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;
import org.hibernate.Transaction;

import com.googlecode.s2hibernate.struts2.plugin.annotations.SessionTarget;
import com.googlecode.s2hibernate.struts2.plugin.annotations.TransactionTarget;

public class MailDAOImpl implements MailDAO {

	
	Log log = LogFactory.getLog(MailDAOImpl.class);

	@SessionTarget
	Session session;

	@TransactionTarget
	Transaction transaction;
	
	@Override
	public List<String> getMailIdList() {
		log.info("getMailIdList()...");
		List<String> mailIdList = null;
		try{
			mailIdList = session.createQuery("select j.email from Jobseeker j").list();
		}catch(Exception e){
			e.printStackTrace();
		}
		return mailIdList;
	}

}
